3.25 \(\int \frac {A+B x+C x^2}{\sqrt {a+b x} \sqrt {a c-b c x} (e+f x)^2} \, dx\)

Optimal. Leaf size=322 \[ \frac {f \left (a^2-b^2 x^2\right ) \left (A+\frac {e (C e-B f)}{f^2}\right )}{\sqrt {a+b x} (e+f x) \sqrt {a c-b c x} \left (b^2 e^2-a^2 f^2\right )}+\frac {\sqrt {a^2 c-b^2 c x^2} \left (a^2 f^2 (2 C e-B f)-b^2 \left (C e^3-A e f^2\right )\right ) \tan ^{-1}\left (\frac {\sqrt {c} \left (a^2 f+b^2 e x\right )}{\sqrt {a^2 c-b^2 c x^2} \sqrt {b^2 e^2-a^2 f^2}}\right )}{\sqrt {c} f^2 \sqrt {a+b x} \sqrt {a c-b c x} \left (b^2 e^2-a^2 f^2\right )^{3/2}}+\frac {C \sqrt {a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{b \sqrt {c} f^2 \sqrt {a+b x} \sqrt {a c-b c x}} \]

[Out]

f*(A+e*(-B*f+C*e)/f^2)*(-b^2*x^2+a^2)/(-a^2*f^2+b^2*e^2)/(f*x+e)/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2)+C*arctan(b*x
*c^(1/2)/(-b^2*c*x^2+a^2*c)^(1/2))*(-b^2*c*x^2+a^2*c)^(1/2)/b/f^2/c^(1/2)/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2)+(a^
2*f^2*(-B*f+2*C*e)-b^2*(-A*e*f^2+C*e^3))*arctan((b^2*e*x+a^2*f)*c^(1/2)/(-a^2*f^2+b^2*e^2)^(1/2)/(-b^2*c*x^2+a
^2*c)^(1/2))*(-b^2*c*x^2+a^2*c)^(1/2)/f^2/(-a^2*f^2+b^2*e^2)^(3/2)/c^(1/2)/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.58, antiderivative size = 322, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {1610, 1651, 844, 217, 203, 725, 204} \[ \frac {f \left (a^2-b^2 x^2\right ) \left (A+\frac {e (C e-B f)}{f^2}\right )}{\sqrt {a+b x} (e+f x) \sqrt {a c-b c x} \left (b^2 e^2-a^2 f^2\right )}+\frac {\sqrt {a^2 c-b^2 c x^2} \left (a^2 f^2 (2 C e-B f)-b^2 \left (C e^3-A e f^2\right )\right ) \tan ^{-1}\left (\frac {\sqrt {c} \left (a^2 f+b^2 e x\right )}{\sqrt {a^2 c-b^2 c x^2} \sqrt {b^2 e^2-a^2 f^2}}\right )}{\sqrt {c} f^2 \sqrt {a+b x} \sqrt {a c-b c x} \left (b^2 e^2-a^2 f^2\right )^{3/2}}+\frac {C \sqrt {a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{b \sqrt {c} f^2 \sqrt {a+b x} \sqrt {a c-b c x}} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x + C*x^2)/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(e + f*x)^2),x]

[Out]

(f*(A + (e*(C*e - B*f))/f^2)*(a^2 - b^2*x^2))/((b^2*e^2 - a^2*f^2)*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(e + f*x))
+ (C*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(b*Sqrt[c]*x)/Sqrt[a^2*c - b^2*c*x^2]])/(b*Sqrt[c]*f^2*Sqrt[a + b*x]*Sqrt[
a*c - b*c*x]) + ((a^2*f^2*(2*C*e - B*f) - b^2*(C*e^3 - A*e*f^2))*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(Sqrt[c]*(a^2*
f + b^2*e*x))/(Sqrt[b^2*e^2 - a^2*f^2]*Sqrt[a^2*c - b^2*c*x^2])])/(Sqrt[c]*f^2*(b^2*e^2 - a^2*f^2)^(3/2)*Sqrt[
a + b*x]*Sqrt[a*c - b*c*x])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 725

Int[1/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (c_.)*(x_)^2]), x_Symbol] :> -Subst[Int[1/(c*d^2 + a*e^2 - x^2), x], x,
 (a*e - c*d*x)/Sqrt[a + c*x^2]] /; FreeQ[{a, c, d, e}, x]

Rule 844

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 1610

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Dist[((
a + b*x)^FracPart[m]*(c + d*x)^FracPart[m])/(a*c + b*d*x^2)^FracPart[m], Int[Px*(a*c + b*d*x^2)^m*(e + f*x)^p,
 x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a*d, 0] && EqQ[m, n] &&  !Intege
rQ[m]

Rule 1651

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, d
 + e*x, x], R = PolynomialRemainder[Pq, d + e*x, x]}, Simp[(e*R*(d + e*x)^(m + 1)*(a + c*x^2)^(p + 1))/((m + 1
)*(c*d^2 + a*e^2)), x] + Dist[1/((m + 1)*(c*d^2 + a*e^2)), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p*ExpandToSum[(m
+ 1)*(c*d^2 + a*e^2)*Q + c*d*R*(m + 1) - c*e*R*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e, p}, x] && Po
lyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[m, -1]

Rubi steps

\begin {align*} \int \frac {A+B x+C x^2}{\sqrt {a+b x} \sqrt {a c-b c x} (e+f x)^2} \, dx &=\frac {\sqrt {a^2 c-b^2 c x^2} \int \frac {A+B x+C x^2}{(e+f x)^2 \sqrt {a^2 c-b^2 c x^2}} \, dx}{\sqrt {a+b x} \sqrt {a c-b c x}}\\ &=\frac {f \left (A+\frac {e (C e-B f)}{f^2}\right ) \left (a^2-b^2 x^2\right )}{\left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)}+\frac {\sqrt {a^2 c-b^2 c x^2} \int \frac {c \left (A b^2 e+a^2 (C e-B f)\right )+c C \left (\frac {b^2 e^2}{f}-a^2 f\right ) x}{(e+f x) \sqrt {a^2 c-b^2 c x^2}} \, dx}{c \left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x}}\\ &=\frac {f \left (A+\frac {e (C e-B f)}{f^2}\right ) \left (a^2-b^2 x^2\right )}{\left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)}+\frac {\left (C \left (\frac {b^2 e^2}{f}-a^2 f\right ) \sqrt {a^2 c-b^2 c x^2}\right ) \int \frac {1}{\sqrt {a^2 c-b^2 c x^2}} \, dx}{f \left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x}}+\frac {\left (\left (-c C e \left (\frac {b^2 e^2}{f}-a^2 f\right )+c f \left (A b^2 e+a^2 (C e-B f)\right )\right ) \sqrt {a^2 c-b^2 c x^2}\right ) \int \frac {1}{(e+f x) \sqrt {a^2 c-b^2 c x^2}} \, dx}{c f \left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x}}\\ &=\frac {f \left (A+\frac {e (C e-B f)}{f^2}\right ) \left (a^2-b^2 x^2\right )}{\left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)}+\frac {\left (C \left (\frac {b^2 e^2}{f}-a^2 f\right ) \sqrt {a^2 c-b^2 c x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{1+b^2 c x^2} \, dx,x,\frac {x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{f \left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x}}-\frac {\left (\left (-c C e \left (\frac {b^2 e^2}{f}-a^2 f\right )+c f \left (A b^2 e+a^2 (C e-B f)\right )\right ) \sqrt {a^2 c-b^2 c x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{-b^2 c e^2+a^2 c f^2-x^2} \, dx,x,\frac {a^2 c f+b^2 c e x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{c f \left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x}}\\ &=\frac {f \left (A+\frac {e (C e-B f)}{f^2}\right ) \left (a^2-b^2 x^2\right )}{\left (b^2 e^2-a^2 f^2\right ) \sqrt {a+b x} \sqrt {a c-b c x} (e+f x)}+\frac {C \sqrt {a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{b \sqrt {c} f^2 \sqrt {a+b x} \sqrt {a c-b c x}}+\frac {\left (a^2 f^2 (2 C e-B f)-b^2 \left (C e^3-A e f^2\right )\right ) \sqrt {a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac {\sqrt {c} \left (a^2 f+b^2 e x\right )}{\sqrt {b^2 e^2-a^2 f^2} \sqrt {a^2 c-b^2 c x^2}}\right )}{\sqrt {c} f^2 \left (b^2 e^2-a^2 f^2\right )^{3/2} \sqrt {a+b x} \sqrt {a c-b c x}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.85, size = 309, normalized size = 0.96 \[ \frac {-\frac {2 b^2 e \sqrt {a-b x} \left (f (A f-B e)+C e^2\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b x} \sqrt {b e-a f}}{\sqrt {a+b x} \sqrt {-a f-b e}}\right )}{(-a f-b e)^{3/2} (b e-a f)^{3/2}}+\frac {f (b x-a) \sqrt {a+b x} \left (f (A f-B e)+C e^2\right )}{(e+f x) (a f-b e) (a f+b e)}-\frac {2 \sqrt {a-b x} (2 C e-B f) \tanh ^{-1}\left (\frac {\sqrt {a-b x} \sqrt {b e-a f}}{\sqrt {a+b x} \sqrt {-a f-b e}}\right )}{\sqrt {-a f-b e} \sqrt {b e-a f}}-\frac {2 C \sqrt {a-b x} \tan ^{-1}\left (\frac {\sqrt {a-b x}}{\sqrt {a+b x}}\right )}{b}}{f^2 \sqrt {c (a-b x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x + C*x^2)/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(e + f*x)^2),x]

[Out]

((f*(C*e^2 + f*(-(B*e) + A*f))*(-a + b*x)*Sqrt[a + b*x])/((-(b*e) + a*f)*(b*e + a*f)*(e + f*x)) - (2*C*Sqrt[a
- b*x]*ArcTan[Sqrt[a - b*x]/Sqrt[a + b*x]])/b - (2*(2*C*e - B*f)*Sqrt[a - b*x]*ArcTanh[(Sqrt[b*e - a*f]*Sqrt[a
 - b*x])/(Sqrt[-(b*e) - a*f]*Sqrt[a + b*x])])/(Sqrt[-(b*e) - a*f]*Sqrt[b*e - a*f]) - (2*b^2*e*(C*e^2 + f*(-(B*
e) + A*f))*Sqrt[a - b*x]*ArcTanh[(Sqrt[b*e - a*f]*Sqrt[a - b*x])/(Sqrt[-(b*e) - a*f]*Sqrt[a + b*x])])/((-(b*e)
 - a*f)^(3/2)*(b*e - a*f)^(3/2)))/(f^2*Sqrt[c*(a - b*x)])

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/(f*x+e)^2/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/(f*x+e)^2/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [B]  time = 0.04, size = 1200, normalized size = 3.73 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((C*x^2+B*x+A)/(f*x+e)^2/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x)

[Out]

(A*ln(2*(b^2*c*e*x+a^2*c*f+((a^2*f^2-b^2*e^2)*c/f^2)^(1/2)*(-(b^2*x^2-a^2)*c)^(1/2)*f)/(f*x+e))*x*b^2*c*e*f^3*
(b^2*c)^(1/2)-B*ln(2*(b^2*c*e*x+a^2*c*f+((a^2*f^2-b^2*e^2)*c/f^2)^(1/2)*(-(b^2*x^2-a^2)*c)^(1/2)*f)/(f*x+e))*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^2)^(1/2)-C*arctan((b^2*c)^(1/2)/(-(b^2*x^2-a^2)*c)^(1/2)*x)
*b^2*c*e^3*f*((a^2*f^2-b^2*e^2)*c/f^2)^(1/2)-A*f^4*(b^2*c)^(1/2)*(-(b^2*x^2-a^2)*c)^(1/2)*((a^2*f^2-b^2*e^2)*c
/f^2)^(1/2)+B*e*f^3*(b^2*c)^(1/2)*(-(b^2*x^2-a^2)*c)^(1/2)*((a^2*f^2-b^2*e^2)*c/f^2)^(1/2)-C*e^2*f^2*(b^2*c)^(
1/2)*(-(b^2*x^2-a^2)*c)^(1/2)*((a^2*f^2-b^2*e^2)*c/f^2)^(1/2))/c*(-(b*x-a)*c)^(1/2)*(b*x+a)^(1/2)/(-(b^2*x^2-a
^2)*c)^(1/2)/(a*f-b*e)/(b^2*c)^(1/2)/(a*f+b*e)/(f*x+e)/((a^2*f^2-b^2*e^2)*c/f^2)^(1/2)/f^3

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x^2+B*x+A)/(f*x+e)^2/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume((4*b^2*c>0)', see `assume?` fo
r more details)Is (4*b^2*c     *(a^2*c-(b^2*c*e^2)                                 /f^2))    /f^2    +(4*b^4*c
^2*e^2)/f^4    zero or nonzero?

________________________________________________________________________________________

mupad [F(-1)]  time = 0.00, size = -1, normalized size = -0.00 \[ \text {Hanged} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x + C*x^2)/((e + f*x)^2*(a*c - b*c*x)^(1/2)*(a + b*x)^(1/2)),x)

[Out]

\text{Hanged}

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x**2+B*x+A)/(f*x+e)**2/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________